#!/bin/bash
if [ "$1" = "-l" ]; then
	URL='http://localhost:8080/import2/'
	shift
else
	URL='http://tppt.appspot.com/import2/'
fi
if [ -d $1 ]; then
	for FILE in $1/*.txt; do
		echo "Uploading $FILE..."
		curl -F "data=@$FILE" $URL
		echo
	done
else
	curl -F "data=@$1" $URL
fi
